"""
Project Name : api_automation_framework
File Name : redirect.py
Author : lldhsds
Date : 2024/12/29 15:54
Description: /redirect/{n} 302 Redirect n times.
"""

import requests

def redirect(n):
    """
    /redirect/{n}, 302 Redirects n times.
    :param n: int
    :responses 200
    """
    url = f"https://httpbin.org/redirect/{n}"
    headers = {'Accept': 'text/html'}
    response = requests.get(url, headers=headers)
    print(response.status_code)
    print(response.headers)
    print(response.text)


redirect(3)
